from wxpyview.ui.component.common.basewidget import *

class BoxSizer(Widget):
    def _getParentParam(self, meta_widget):
        stopping_point = ['BoxSizer', 'FlexGridSizer', 'Panel', 'Frame', 'Dialog']       
        return ComponentLibrary.findFirstMatchedAncestor(meta_widget, stopping_point)
    
    def _setParams(self, meta_widget):
        dom = meta_widget.getDOM()
        if not dom:
            raise IOException
        
        #self.parent = self._getParentParam(meta_widget)
        
    def create(self, meta_widget):
        #self._setParams(meta_widget)

        #sizer = wx.BoxSizer()
        
        parent = self._getParentParam(meta_widget)
        parent.SetSizer
        
        #return wx.Button(**self.params)